#!/bin/bash
while [ 1 ]
do
    read -p "Please input a number:(if your input \"end\", it will exit)" n
    num=`echo $n | sed 's/[0-9]//g' | wc -L`
    echo $num
    if [ $n == "end" ]
    then
        echo "Bye"
        exit
    fi
    if [ $num -ne 0 ]
    then
        echo "Your input is not a number! Try Again"
    else
        echo "Your input number is $n"
    fi
done
